<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<script type="text/javascript">
	var headData=[
		[
			{title:checkHtml(),name:"SHORT_NAME",width:"30%",align:"center",format:checkHtml},
			{title:"公司",name:"SHORT_NAME",width:"65%",align:"center"},
			{title:"联系电话",name:"TEL",width:"65%",align:"center"},
			{title:"创建人",name:"CREATE_USER",width:"65%",align:"center"},
			{title:"状态",name:"name",width:"65%",align:"center",format:stateHtml1},
			{title:"编辑&nbsp;删除",name:"name",width:"65%",align:"center",format:ctrHtml}
		],
		[
			{title:checkHtml(),name:"SHORT_NAME",width:"30%",align:"center",format:checkHtml},
			{title:"部门",name:"SHORT_NAME",width:"65%",align:"center"},
			{title:"上级部门",name:"PARENT_ID_NAME",width:"65%",align:"center"},
			{title:"上级公司",name:"COMPANY_ID_NAME",width:"65%",align:"center"},
			{title:"状态",name:"name",width:"65%",align:"center",format:stateHtml2},
			{title:"编辑&nbsp;删除",name:"name",width:"65%",align:"center",format:ctrHtml2}
		],
		[
			{title:checkHtml(),name:"SHORT_NAME",width:"30%",align:"center",format:checkHtml},
			{title:"岗位名称",name:"SHORT_NAME",width:"65%",align:"center"},
			{title:"上级部门",name:"DEPT_ID_NAME",width:"65%",align:"center"},
			{title:"上级公司",name:"COMPANY_ID_NAME",width:"65%",align:"center"},
			{title:"状态",name:"name",width:"65%",align:"center",format:stateHtml3},
			{title:"编辑&nbsp;删除",name:"name",width:"65%",align:"center",format:ctrHtml3}
		]
	]

	$(function(){
		new page(".tabPage:eq(0)",headData[0]);
		new page(".tabPage:eq(1)",headData[1]);
		new page(".tabPage:eq(2)",headData[2]);
	})
	function initCkBox()
	{

	}
	//状态
	function stateHtml1(data){
		var id=null;
		if(data != undefined)
		{
			id=data["ID_"];
		}

		return  '<em data="'+data["ID_"]+'" url="<%=request.getContextPath() %>/settings/org/company/updateState.json?STATE='+(data['STATE_']==0?"1":"0")+'" class="on-off btn ajax '+(data['STATE_']==0?"active":"")+'"></em>';
	}

	function stateHtml2(data){
		var id=null;
		if(data != undefined)
		{
			id=data["ID_"];
		}

		return  '<em data="'+data["ID_"]+'" url="<%=request.getContextPath() %>/settings/org/dept/updateState.json?STATE='+(data['STATE_']==0?"1":"0")+'" class="on-off btn ajax '+(data['STATE_']==0?"active":"")+'"></em>';
	}

	function stateHtml3(data){
		var id=null;
		if(data != undefined)
		{
			id=data["ID_"];
		}

		return  '<em data="'+data["ID_"]+'" url="<%=request.getContextPath() %>/settings/org/post/updateState.json?STATE='+(data['STATE_']==0?"1":"0")+'" class="on-off btn ajax '+(data['STATE_']==0?"active":"")+'"></em>';
	}

	function dataDeatil(json){
	    var h="<li class=\"w12-4-3-1 no-right\" style='list-style: none;'>" +
	        "<em onclick=delCrossOver('"+json.id+"') class=\"delet2\"></em></li>";
	    return h;
	}
	//控制
	function ctrHtml(data){
		return  '<li class="w15 no-right" style="list-style-type:none;position:relative"><a  class="edit0 new  edit" modal="#add-gsgl" title="编辑公司信息" url="<%=request.getContextPath() %>/settings/org/company/update.json"  href="javascript:;"></a><a class="delet2 new  del" href="javascript:;" url="<%=request.getContextPath() %>/settings/org/company/del.json"></a></li>';
	}
	function ctrHtml2(data){
		return  '<li class="w15 no-right" style="list-style-type:none;position:relative"><a  class="edit0 new  edit" modal="#add-bmgl" title="编辑部门信息" url="<%=request.getContextPath() %>/settings/org/dept/update.json"  href="javascript:;"></a>&nbsp;&nbsp;<a class="delet2 new  del" href="javascript:;" url="<%=request.getContextPath() %>/settings/org/dept/del.json"></a></li>';
	}
	function ctrHtml3(data){
		return  '<li class="w15 no-right" style="list-style-type:none;position:relative"><a  class="edit0 new  edit" modal="#add-gwgl" title="编辑岗位信息" url="<%=request.getContextPath() %>/settings/org/post/update.json"  href="javascript:;"></a>&nbsp;&nbsp;<a class="delet2 new del" href="javascript:;" url="<%=request.getContextPath() %>/settings/org/post/del.json"></a></li>';
	}
	//选择框
	function checkHtml(data){
		var id=null;
		if(data != undefined)
		{
			id=data["ID_"];
		}
		return  '<span class="table-ck"><span class="check-box selected " '+(id!=null?"id='"+id+"' item=''":"base=''")+' ><i></i></span></span>';
	}

	var ui=new Object();
	ui.url="${resourcePath}";
	$(function(){
		$("#org li:eq(3)").click(function(){
				showTree($("#box"));

		})
	})
</script>
<!-- 公司管理-->
<div class="set-t0 tabPage" search="<%=request.getContextPath() %>/settings/org/company/search.json" init="true">
	<div class="se-bt clearFix">
		<div class="sel w305">
			<span class="d-name">公司名称</span>
			<input type="text"  maxlength="80" style="width:231px;margin-left:5px" placeholder="输入公司名称" data-name="name">
		</div>
		<a style="float:left;margin-left:10px" class="btn btn-w100 btn-search-icon btn-h30 search" href="javascript:;"><em></em>查询</a>
	</div>
	<p class="tool pad20" >

		<a  href="javascript:;" title="新增公司信息" modal="#add-gsgl" url="<%=request.getContextPath() %>/settings/org/company/add.json" class="btn  btn-add-icon1 add">新建</a>
		<a href="javascript:;"   url="<%=request.getContextPath() %>/settings/org/company/del.json"  class="btn-del-icon btn delAll">删除</a>
	</p>
	<div class="l-r clearFix pad20">
		<div class="left ">
			<div class="info-header clearFix tabBox" >


			</div>
		</div>
	</div>
</div>
<!-- 部门管理-->
<div class="set-t0 none tabPage" search="<%=request.getContextPath() %>/settings/org/dept/search.json" click=".org li:eq(1)">
	<div class="se-bt clearFix">
		<div class="sel w305">
			<span class="d-name">部门名称</span>
			<input type="text" style="width:231px;margin-left:5px" maxlength="80" placeholder="输入部门名称" data-name="mSHORT_NAME">
		</div>
		<div class="sel w305">
			<span class="d-name">上级公司</span>
			<div class="dropdown-list" style="float:left" text="上级公司"  data-name='companyId' url="<%=request.getContextPath() %>/settings/org/company/search.json?state=0" sel-id="ID_" sel-name='SHORT_NAME'>
				<div class="drop-list drop-list-min">
					<div class="checked" style="width:270px;height:28px;" id="lineDiv">
						<a href="javascript:void(0);">上级公司</a><span></span>
					</div>
					<span class="down-span"></span>
				</div>
				<ul class="select select-min none baseLine">

				</ul>
			</div>
		</div>
		<a href="javascript:void(0)" class="btn btn-w100 btn-search-icon btn-h30 search" style="float:left">查询</a>
	</div>
	<p class="tool pad20" style="margin-top:-30px">
		<a  href="javascript:;"  title="新增部门信息" modal="#add-bmgl"  url="<%=request.getContextPath() %>/settings/org/dept/add.json"   class="btn btn-add-icon1  add"><em></em>新建</a>
		<a href="javascript:;"   url="<%=request.getContextPath() %>/settings/org/dept/del.json"  class="btn-del-icon btn delAll"><em></em>删除</a>
	</p>
	<div class="l-r clearFix pad20">
		<div class="left">
			<div class="info-header clearFix tabBox" >



			</div>
		</div>
	</div>
</div>
<!-- 岗位管理-->
<div class="set-t0 none tabPage" search="<%=request.getContextPath() %>/settings/org/post/search.json"  click=".org li:eq(2)">
	<div class="se-bt clearFix">
		<div class="sel w305">
			<span class="d-name">岗位名称</span>
			<input type="text"  maxlength="80" style="width:231px;margin-left:5px" placeholder="输入岗位名称" data-name="mSHORT_NAME">
		</div>
		<div class="sel w305">
			<span class="d-name">上级公司</span>
			<div class="dropdown-list" style="float:left" text="上级公司"  data-name='companyId' url="<%=request.getContextPath() %>/settings/org/company/search.json?state=0" sel-id="ID_" sel-name='SHORT_NAME' next="deptId">
				<div class="drop-list drop-list-min">
					<div class="checked" style="width:270px;height:28px;" id="lineDiv">
						<a href="javascript:void(0);">上级公司</a><span></span>
					</div>
					<span class="down-span"></span>
				</div>
				<ul class="select select-min none baseLine">

				</ul>
			</div>
		</div>
		<div class="sel w305">
			<span class="d-name">上级部门</span>
			<div class="dropdown-list" style="float:left"  text="上级部门"  data-name='deptId' url="<%=request.getContextPath() %>/settings/org/dept/search.json?state=0" sel-id="ID_" sel-name='SHORT_NAME' where="companyId">
				<div class="drop-list drop-list-min">
					<div class="checked" style="width:270px;height:28px;" id="lineDiv">
						<a href="javascript:void(0);">上级部门</a><span></span>
					</div>
					<span class="down-span"></span>
				</div>
				<ul class="select select-min none baseLine">

				</ul>
			</div>
		</div>
		<a href="javascript:void(0)" class="btn btn-w100 btn-search-icon btn-h30 search" style="float:left">查询</a>
	</div>
	<p class="tool pad20" style="margin-top:-30px">
		<a  href="javascript:;"  title="新增岗位信息" modal="#add-gwgl"  url="<%=request.getContextPath() %>/settings/org/post/add.json"  class="btn btn-add-icon1 btn add"><em></em>新建</a>
		<a href="javascript:;"   url="<%=request.getContextPath() %>/settings/org/post/del.json"   class="btn-del-icon btn delAll"><em></em>删除</a>
	</p>
	<div class="l-r clearFix pad20">
		<div class="left">
			<div class="info-header clearFix tabBox" >


			</div>
		</div>
	</div>
</div>
<!-- 综合管理-->
<div class="set-t0 none " style="padding-bottom:80px;min-height:500px;" id="box" url="<%=request.getContextPath()%>/settings/org/orgStruct/search.json">
</div>








